<?
if(empty($article)) {
    __('Invalid article');
} else { ?>
    <? $this->pageTitle = $article['Article']['title'].' - '.$this->pageTitle; ?>
<div class="article">
        <? if($article['Article']['show_informations'] && !empty($article['Tag'])) { ?>
    <div id="article_tags" style="background:#ddf8cc; margin: 1em 1em 1em 0;">
        <div class="rounded_ul">
            <div class="rounded_ur">
                <div class="rounded_ll">
                    <div class="rounded_lr">
                        <div style="padding: 1em;">
                                    <? __('Tags'); ?>:
                                    <? foreach ($article['Tag'] as $tag): ?>
                                        <? echo $html->link($tag['name'],array('controller'=>'tags','action'=>'view',$tag['seo_link'])); ?>
                                    <? endforeach; ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
        <? } ?>

    <div id="text">
        <h1><? echo $article['Article']['title']; ?></h1>

            <? if($article["Article"]["show_author"]) { ?>
        <p class="article_author">
                    <? __('author'); echo ': '.$article['User']['name']; ?>,
                    <? __('created'); echo ': '.$time->timeAgoInWords($article['Article']['created']); ?>
        </p>
            <? } ?>

            <? echo $article['Article']['intro_text']; ?>

            <? echo $article['Article']['text']; ?>
    </div>
        <? if($article['Article']['show_informations']) { ?>
            <? include_once "rating.ctp"; ?>

    <div id="recent_articles">
                <? if(!empty($recentArticles)) { ?>
        <h3><? __('recent articles'); ?></h3>
        <ul>
                        <? foreach ($recentArticles as $recent): ?>
            <li><? echo $html->link($recent['Article']['title'],'/articles/'.$time->format('Y/m/d',$recent['Article']['created']).'/'.$recent['Article']['seo_link']); ?></li>
                        <? endforeach; ?>
            <li>...</li>
            <li><? echo $html->link(__('all recent articles',true),'/categories/view/'.$article['Category']['seo_link']) ?></li>
        </ul>
                <? } ?>
    </div>

            <? include_once "comment_all.ctp"; ?>

            <? include_once "comment_add.ctp"; ?>
        <?
        }
    } ?>
</div>